Construction of Eecient Generalized Lr Parsers

نویسندگان

  • Miguel A. Alonso
  • David Cabrero
  • Manuel Vilares
چکیده

We show how LR parsers for the analysis of arbitrary context-free grammars can be derived from classical Earley's parsing algorithm. The result is a Generalized LR parsing algorithm working at complexity O(n 3) in the worst case, which is achieved by the use of dynamic programming to represent the non-deterministic evolution of the stack instead of graph-structured stack representations, as has often been the case in previous approaches. The algorithm behaves better in practical cases, achieving linear complexity on LR grammars. Experimental results show the performance of our proposal.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Case Study in Functional Programming: Generating Eecient Functional Lr(1) Parsers

This paper presents a case study in functional programming. The paper is based upon a chapter of the course notes of a grammars and parsing course which the authors have given to undergraduate students. The chapter presents a functional program that generates eecient functional LR(1) parsers.

متن کامل

Construction of E cient Generalized LR Parsers

We show how LR parsers for the analysis of arbitrary context-free grammars can be derived from classical Earley's parsing algorithm. The result is a Generalized LR parsing algorithm working at complexity O(n 3) in the worst case, which is achieved by the use of dynamic programming to represent the non-deterministic evolution of the stack instead of graph-structured stack representations, as has...

متن کامل

Construction of Efficient Generalized LR Parsers

We show how LR parsers for the analysis of arbitrary contextfree grammars can be derived from classical Earley’s parsing algorithm. The result is a Generalized LR parsing algorithm working at complexity O(n) in the worst case, which is achieved by the use of dynamic programming to represent the non-deterministic evolution of the stack instead of graph-structured stack representations, as has of...

متن کامل

Visual Language Editors Based on Lr Parsing Techniques

Visual language editors should provide a user-friendly environment where users are supported in an effective way in the construction of visual sentences. In this paper, we propose an approach for the construction of syntax-directed visual language editors by integrating incremental parsers into freehand editors. The approach combines the LR-based techniques for parsing visual languages with the...

متن کامل

Controlled Grammatic

A new approach to ambiguity of context-free grammars is presented, and within this approach the LL and LR techniques are generalized to solve the following problems for large classes of ambiguous grammars: |Construction of a parser that accepts all sentences generated by the grammar, and which always terminates in linear time. |Identiication of the structural ambiguity: a nite set of pairs of p...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1997